home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / streaming / qtspacketizerreassembler / imaaudiortp / headers / rtpdefines.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  5.1 KB  |  225 lines

  1. /*
  2.     File:        RTPDefines.r
  3.  
  4.     Contains:    definitions from the RTP header files (for rezzing)
  5.  
  6.     Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #ifndef __RTPDEFINES_R__
  11. #define __RTPDEFINES_R__
  12.  
  13. // ---------------------------------------------------------------------------
  14. //        from RTPGroup.h and RTPCommon.h
  15. // ---------------------------------------------------------------------------
  16.  
  17. enum {
  18.     kRTPComponentType            = 'rtp ',
  19.     kRTPReassemblerType            = 'rtpr',
  20.     kRTPPayloadMapType            = 'rtpc',
  21.     kRTPLivePacketizerType        = 'rtpl',
  22.     kRTPMediaPacketizerType        = 'rtpm',
  23.     kRTPPacketBuilderType        = 'rtpb',
  24.     
  25.     kRTPComponentSubType        = 'v2  ',
  26.     kRTPPayloadMapSubType        = 'gnrc'
  27. };
  28.  
  29. enum {
  30.     kRTPBaseReassemblerType            = 'gnrc',
  31.     kRTP261ReassemblerType            = 'h261',
  32.     kRTP263ReassemblerType            = 'h263',
  33.     kRTP263PlusReassemblerType        = '263+',
  34.     kRTPAudioReassemblerType        = 'soun',
  35.     kRTPQTReassemblerType            = 'qtim',
  36.     kRTPSmartRateReassemblerType    = 'Qclp',
  37.     kRTPJPEGReassemblerType            = 'jpeg',
  38.     kRTPAudioReassemblerPackType    = 'soun'
  39. };
  40.  
  41. enum {
  42.     kRTPLivePacketizerAudioType        = 'soun',
  43.     kRTPLivePacketizerMPType        = 'rtpm'
  44. };
  45.  
  46. enum {
  47.     kRTPBaseMediaPacketizerType            = 'gnrc',
  48.     kRTP261MediaPacketizerType            = 'h261',
  49.     kRTP263MediaPacketizerType            = 'h263',
  50.     kRTP263PlusMediaPacketizerType        = '263+',
  51.     kRTPAudioMediaPacketizerType        = 'soun',
  52.     kRTPQTMediaPacketizerType            = 'qtim',
  53.     kRTPQualcommMediaPacketizerType        = 'Qclp',
  54.     kRTPJPEGMediaPacketizerType            = 'jpeg'
  55. };
  56.  
  57.  
  58. enum {
  59.     kRTPGetPayloadInfo            = 'RTPM'        /* QTAtomContainer */
  60. };
  61.  
  62. // payload info container atoms
  63. enum {
  64.     kRTPStaticPayloadTypeAID    = 'MAPS',        /* UInt16 */
  65.     kRTPDynamicPayloadNameAID    = 'MAPD',        /* cstring */
  66.     kRTPMediaCodecPairAID        = 'MAPC'        /* OSType[2] */
  67. };
  68.  
  69.  
  70. /* RTP standard content encodings for audio */
  71. #define RTPCONT_PCMU            0       /* 8kHz PCM mu-law mono */
  72. #define RTPCONT_1016            1       /* 8kHz CELP (Fed Std 1016) mono */
  73. #define RTPCONT_G721            2       /* 8kHz G.721 ADPCM mono */
  74. #define RTPCONT_GSM             3       /* 8kHz GSM mono */
  75. #define RTPCONT_G723            4       /* 8kHz G.723 ADPCM mono */
  76. #define RTPCONT_DVI             5       /* 8kHz Intel DVI ADPCM mono */
  77. #define RTPCONT_L16_16          6       /* 16kHz 16-bit linear mono */
  78. #define RTPCONT_L16_44_2        7       /* 44.1kHz 16-bit linear stereo */
  79. #define RTPCONT_MPEGAUDIO        14        /* MPEG I and II audio */
  80.  
  81. /* RTP standard content encodings for video */
  82. #define RTPCONT_CELLB           25      /* Sun CellB */
  83. #define RTPCONT_JPEG            26      /* JPEG */
  84. #define RTPCONT_CUSEEME         27      /* Cornell CU-SeeMe */
  85. #define RTPCONT_NV              28      /* Xerox PARC nv */
  86. #define RTPCONT_PICWIN          29      /* BBN Picture Window */
  87. #define RTPCONT_CPV             30      /* Bolter CPV */
  88. #define RTPCONT_H261            31      /* CCITT H.261 */
  89. #define RTPCONT_MPEGVIDEO        32      /* MPEG I and II video */
  90. #define RTPCONT_H263            34      /* CCITT H.263 */
  91. #define RTPCONT_H263PLUS        35      /* JUST MADE THIS UP FOR NOW */
  92.  
  93. /* Other RTP standard content encodings */
  94. #define RTPCONT_MPEG2T            33      /* MPEG 2 Transport */
  95.  
  96.  
  97. #ifdef REZ
  98.  
  99. type kRTPDynamicPayloadNameAID {
  100.     // 10 bytes of reserved
  101.     longint = 0;
  102.     longint = 0;
  103.     integer = 0;
  104.     // 2 bytes of lock count
  105.     integer = 0;
  106.     
  107.     // size of this atom
  108.     parentStart:
  109.     longint = ( (parentEnd - parentStart) / 8 );
  110.     
  111.     // atom type
  112.     literal longint = 'sean';
  113.     
  114.     // atom id
  115.     longint = 1;
  116.     integer = 0;
  117.     integer =  $$CountOf(AtomArray);
  118.     longint = 0;
  119.     
  120.     array AtomArray {
  121.         atomStart:
  122.         // size of this atom
  123.         longint = ((atomEnd[$$ArrayIndex(AtomArray)] - atomStart[$$ArrayIndex(AtomArray)]) / 8);
  124.         
  125.         // atom type
  126.         literal longint;
  127.         
  128.         // atom id
  129.         longint;
  130.         integer = 0;
  131.         integer = 0; // no children
  132.         longint = 0;
  133.         string;
  134.         atomEnd:
  135.         };
  136.     parentEnd:
  137.         
  138. };
  139.  
  140. type kRTPStaticPayloadTypeAID {
  141.     // 10 bytes of reserved
  142.     longint = 0;
  143.     longint = 0;
  144.     integer = 0;
  145.     // 2 bytes of lock count
  146.     integer = 0;
  147.     
  148.     // size of this atom
  149.     parentStart:
  150.     longint = ( (parentEnd - parentStart) / 8 );
  151.     
  152.     // atom type
  153.     literal longint = 'sean';
  154.     
  155.     // atom id
  156.     longint = 1;
  157.     integer = 0;
  158.     integer =  $$CountOf(AtomArray);
  159.     longint = 0;
  160.     
  161.     array AtomArray {
  162.         atomStart:
  163.         // size of this atom
  164.         longint = ((atomEnd[$$ArrayIndex(AtomArray)] - atomStart[$$ArrayIndex(AtomArray)]) / 8);
  165.         
  166.         // atom type
  167.         literal longint;
  168.         
  169.         // atom id
  170.         longint;
  171.         integer = 0;
  172.         integer = 0; // no children
  173.         longint = 0;
  174.         byte;
  175.         atomEnd:
  176.         };
  177.     parentEnd:
  178.         
  179. };
  180.  
  181. type kRTPMediaCodecPairAID {
  182.     // 10 bytes of reserved
  183.     longint = 0;
  184.     longint = 0;
  185.     integer = 0;
  186.     // 2 bytes of lock count
  187.     integer = 0;
  188.     
  189.     // size of this atom
  190.     parentStart:
  191.     longint = ( (parentEnd - parentStart) / 8 );
  192.     
  193.     // atom type
  194.     literal longint = 'sean';
  195.     
  196.     // atom id
  197.     longint = 1;
  198.     integer = 0;
  199.     integer =  $$CountOf(AtomArray);
  200.     longint = 0;
  201.     
  202.     array AtomArray {
  203.         atomStart:
  204.         // size of this atom
  205.         longint = ((atomEnd[$$ArrayIndex(AtomArray)] - atomStart[$$ArrayIndex(AtomArray)]) / 8);
  206.         
  207.         // atom type
  208.         literal longint;
  209.         
  210.         // atom id
  211.         longint;
  212.         integer = 0;
  213.         integer = 0; // no children
  214.         longint = 0;
  215.         longint;        // media type
  216.         longint;        // codec type
  217.         atomEnd:
  218.         };
  219.     parentEnd:
  220.         
  221. };
  222.  
  223. #endif /* REZ */
  224. #endif /* __RTPDEFINES_R__ */
  225.